<%--
  Created by IntelliJ IDEA.
  User: wyk
  Date: 2024/8/27
  Time: 12:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<c:set var="path" value="${pageContext.request.contextPath}"></c:set>
<link rel="stylesheet" type="text/css" href="${path}/static/manage/css/EditStyle.css">
<html>
<head>
    <title>修改</title>
</head>
<body>
<script src="${path}/static/manage/js/jquery-3.6.0.min.js"></script>
<script>

        $(function () {
        $("#cancel").click(cancel);
    })

        function cancel() {
        location.href = "${path}/manage/parkingCheck";
    }


</script>
<form action="${path}/manage/updateParking">
    <input type="hidden" value="${parking.id}" name="id">
<table style="margin: 50px auto;">
        <tr>
            <td>所在区域:</td>
            <td><input value="${parking.region}" name="region"></td>
        </tr>
    <tr>
        <td>状态:</td>
        <td><select name="status"><option value="${parking.status}" selected>${parking.status?"可租":"不可租"}</option><option value="${!parking.status}">${!parking.status?"可租":"不可租"}</option></select></td>
    </tr>
    <tr>
        <td>停车位类型:</td>
        <td><select name="parkingType.id"><c:forEach items="${parkingTypeList}" var="parkingType">
          <c:choose>
              <c:when test="${parking.parkingType.id}==${parkingType.id}">
                  <option value="${parkingType.id}" selected>${parkingType.typeName}</option>
              </c:when>
              <c:otherwise>
                  <option value="${parkingType.id}">${parkingType.typeName}</option>
              </c:otherwise>
          </c:choose>
        </c:forEach></select></td>
    </tr>
    <tr><td>备注:</td><td><input value="${parking.beizhu}" name="beizhu"></td></tr>
    <tr><td><input type="submit" value="修改"></td><td><input type="button" value="取消" id="cancel"></td></tr>
</table>
</form>
</body>
</html>
